
import com.sun.webkit.dom.JSObject;
import org.codehaus.groovy.runtime.InvokerHelper;

JSObject.metaClass.methodMissing = {String name, args ->
	int x = args.length;
	def newargs = new Object[x+1];
	newargs[0] = name;
	for (int i=0; i<x; i++) {
		newargs[i+1] = args[i];
	}
	return InvokerHelper.invokeMethod(delegate, 'call', newargs);
}

println '-----MOP OK-----'